In a storage using a flash memory, a plurality of memory chips is distributed to a plurality of channels and the channels are driven in parallel to enhance data transfer performance. Physical blocks are collected from the channels, respectively, and a logical block serving as a virtual block is constructed of the collected physical blocks. The logical block is a unit of management such as erasure and wear leveling. A physical page is selected from each of the physical blocks constituting the logical block and a logical page serving as a virtual page is constructed of the selected physical pages. The logical page is a unit of read and a unit of write.
This type of storages adopts an inter-channel error correction code (ECC) for creating a redundant code from data distributed and stored in the memory chips (the channels) to relieve defects in the memory chips. In the inter-channel ECC, when a redundant code is to be calculated, the redundant code is calculated using code source data stored in a buffer. After calculation of the redundant code is ended, the calculated redundant code and the code source data corresponding to the redundant code are transferred to the memory chips at the same time in parallel via the channels, so that write operations for the redundant code and the code source data corresponding to the redundant code are performed at the same time.
To transfer the redundant code and the code source data corresponding to the redundant code to the memory chips in parallel in this way, the code source data needs to be kept in the buffer while the redundant code is calculated, which increases the retention time of the code source data in the buffer and correspondingly increases the capacity of the buffer.